<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <meta charset="UTF-8">
    <title>User Info</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f9;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .info-container {
            background-color: #ffffff;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            width: 400px;
            text-align: left;
        }

        .info-container h1 {
            color: #333;
            font-size: 24px;
            margin-bottom: 20px;
            text-align: center;
        }

        .info-container p {
            font-size: 16px;
            color: #555;
            margin: 10px 0;
        }

        .info-container span {
            font-weight: bold;
            color: #007bff;
        }

        .info-container .highlight {
            color: #28a745;
        }

        .info-container .footer {
            margin-top: 20px;
            text-align: center;
            font-size: 14px;
            color: #777;
        }
    </style>
</head>
<body>
<div class="info-container">
    <h1>User Information</h1>
    <p>登录账号: <span sec:authentication="name"></span></p>
    <p>登录账号: <span sec:authentication="principal.username"></span></p>
    <p>凭证: <span class="highlight" sec:authentication="credentials"></span></p>
    <p>权限角色: <span class="highlight" sec:authentication="authorities"></span></p>
    <p>地址: <span sec:authentication="details.remoteAddress"></span></p>
    <p>Session ID: <span sec:authentication="details.sessionId"></span></p>
    <div class="footer">
        <a href="/toHomePage">return to home page</a>
        <p>Powered by Spring Security & Thymeleaf</p>
    </div>
</div>
</body>
</html>